﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<IPMS.Models.Project>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Main" runat="server">

     <div id="main">
        <div id="m-top">
            <img src="../../Content/images/project.png" alt="Project" width="50px"/>
            <h4>Danh sách dự án</h4>
            <div id="action">
                <a href="<%: IPMS.Library.Helper.GetActionLink("create", "project")%>" title="Đăng ký dự án">
                    <img src="../../Content/images/add1.png" alt="Thêm Dự án"/>
                </a>
            </div>
        </div><!--end of m-top-->        
            <div id="list">
                <div class="heading">
                    <div style="width:3%;">
                        <input type="checkbox" name="chkAll" id="chkAll" value="0"/>
                    </div>  
                    <div style="width:40%;">
                        Tên dự án
                    </div>
                    <div style="width:20%;">
                        Số QĐ
                    </div>
                    <div style="width:10%;">
                        Ngày QĐ
                    </div>
                    <div style="width:12%;">Phê duyệt</div>
                    <div style="width:15%;">Trạng thái</div>
                </div><!--end of #list .heading -->
                <%
                    int index = 1;
                    foreach (IPMS.Models.Project project in Model)
                    {
                 %>
                 <div class="row">
                    <div style="width:3%;">
                        <input type="checkbox" name="chkID" value="<%:project.ID %>"/>
                    </div>  
                    <div style="width:40%;">
                        <%: project.Name%>
                    </div>
                    <div style="width:20%;">
                        <%: project.Number%>
                    </div>
                    <div style="width:10%;">
                        <%: String.Format("{0:dd/MM/yyyy}",project.DecisionDate)%>
                    </div>
                    <div style="width:12%;">
                        <%if (project.Approved.Value)
                          {
                        %>
                        <img src="../../Content/images/actived.png" alt="Yes"/>
                        <%
                            }
                          else
                          { %>
                          <img src="../../Content/images/noactived.png" alt="No"/>
                        <%
                            }
                        %>
                    </div>
                    <div style="width:15%;">
                        <%: IPMS.Library.ProjectHelper.GetStatus(project.Status) %>
                    </div>
                </div><!--end of #list .row -->
                 <div class="row-action <%: (index == Model.Count) ? "last" : "" %>">
                        <a href="<%: IPMS.Library.Helper.GetActionLink("detail", "project", project.ID)%>" title="Thông tin chi tiết">
                            <img src="../../Content/images/details.png" alt="Chi tiết"/>
                            <span>Chi tiết</span>
                        </a>
                        <%
                            if (project.Approved.Value)
                            {
                         %>
                        <a href="<%: IPMS.Library.Helper.GetActionLink("list", "package", project.ID)%>" title="Xem danh sách gói thầu">
                            <img src="../../Content/images/list_bullets.png" alt="Danh sách gói thầu"/>
                            <span>DS Gói thầu</span>
                        </a>
                        <%
                            }
                        %>
                        <a href="<%: IPMS.Library.Helper.GetActionLink("edit", "project", project.ID)%>" title="Chỉnh sửa thông tin">
                            <img src="../../Content/images/edit.png" alt="Sửa"/>
                            <span>Cập nhật</span>
                        </a>
                        <a href="<%: IPMS.Library.Helper.GetActionLink("list", "package", project.ID)%>" title="Xem TKTC-TDT">
                            <img src="../../Content/images/coins1.png" alt="TKTC-TDT" width="20px"/>
                            <span>TKTC-TDT</span>
                        </a>
                        <a href="<%: IPMS.Library.Helper.GetActionLink("delete", "project", project.ID)%>" title="Xóa Dự án">
                            <img src="../../Content/images/delete1.png" alt="Xóa"/>
                            <span>Xóa</span>
                        </a>
                </div><!--end of #list .row-action -->
                 <%
                     index++;
                    }
                 %>
            </div><!--end of list -->
     </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="server">
    IPMS > Danh sách dự án
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="CSS" runat="server">
    <link type="text/css" rel="Stylesheet" href="../../Content/css/list.css" />
</asp:Content>